# 建立 python3.11 环境
#FROM python:3.6
FROM registry.cn-hangzhou.aliyuncs.com/jushiyun/jsy_backend:1.0.0
# 镜像作者
MAINTAINER yx

# 设置 python 环境变量
ENV PYTHONUNBUFFERED 1

# 设置pip源为国内源
COPY pip.conf /root/.pip/pip.conf
# 在容器内创建django文件夹
RUN mkdir -p /usr/local/src/django
# 设置容器内工作目录
WORKDIR /usr/local/src/django

# 将当前目录文件加入到容器工作目录中（. 表示当前宿主机目录）
ADD . /usr/local/src/django
#COPY /etc/localtime /etc/localtime
#VOLUME ["/etc/localtime","/etc/localtime:ro"]

VOLUME ["/usr/local/src/django/src/static"]
# pip安装依赖
RUN ["python", "-m", "pip","install","--upgrade","pip"]
RUN ["pip", "install", "-r", "/usr/local/src/django/requirements.txt"]
ENTRYPOINT ["sh","./start.sh"]











